﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace System
{
	public enum TradeType
	{
		BUY,
		SELL
	}
	public class Trade
	{
		public double OpenPrice;
		public double Lot;
		public TradeType type;
		public Trade(double price, double lot, TradeType t)
		{
			OpenPrice = price;
			Lot = lot;
			type = t;
		}
		public double GetProfit(double ClosePrice, double PointSize = 0.0001)
		{
			return Lot * (ClosePrice - OpenPrice) * (type == TradeType.BUY ? 1 : -1) / PointSize;
		}
	}
}